<div class="col_02" id="rightside">
	<div class="col_02_01" id="sysContent_box">
		<div class="main-wrap">
			<div class="m-t">
				<h2>Network Home</h2>
			</div>

			<div class="m-c">
				<form name="search" method="GET" action="" id="J_rec_search">
					<div class="searchbox">
						<div class="wrap">
							<div class="search_type fl">
								<input type="hidden" name="type" class="type" value="t1"/>
								<span class="type_c">Recruiter</span>
								<ul class="type_list">
									<li><a href="#" name="t1">Recruiter</a></li>
								</ul>
							</div>
							<label class="fl"><input type="text" style="width:220px"  class="key_specialty gray" maxlength="200" name="key_words" value="{if $s.key_words <> ''}{$s.key_words}{else}Keywords{/if}"/></label>
							<label class="fl"><input type="text" style="width:220px"  class="key_city gray" maxlength="200" name="key_city" value="{if $s.key_city <> ''}{$s.key_city}{else}City{/if}" /></label>											
							<div class="clearfix"></div>
						</div>
						<div class="but_wrap mt_10"><div class="but_wrap mt_10"><input type="submit" class="button-secondary btn_submit" value="Search" /> <input type="button" class="button-secondary" value="Clear" onclick="location.href='rec_home.php'"/> <a href="findrecruiter.php" class="lnk-Advanced">Advanced</a></div>
						</div>
					</div>
				</form>
				<hr class="line" />
				<div class="mt_10">
				{$page}
				  <table width="100%" border="0" cellpadding="4" cellspacing="1" id="resultRecruiter" class=" tableGrey line_gray table_textTop">
				   <tbody>
					  {section name=custom loop=$reclist}
						  <tr class="hotline">
							<td>
							{$reclist[custom].foto}</td>
							<td width="200">
								<h2 class="u-name">{if $u_status == 'Trial'}<a href="#inline1" class="upgrade1">{else}<a href="recdetail.php?id={$reclist[custom].rc_id}">{/if} {$reclist[custom].rc_name|truncate:18:""}</a></h2>
								{$reclist[custom].rc_title}<br />
								{$reclist[custom].rc_location}<br />
								Specialty: {$reclist[custom].rc_specialty}<br />
								Industry: {$reclist[custom].rc_industry}<br />
							</td>
							<td width="150">
								<h2 class="h_t">Open To</h2>
								{if $reclist[custom].rc_share == 1}Job-Split/Partnerships<br />{/if}
								{if $reclist[custom].rc_business == 1}Regular Employee<br />{/if}
								{if $reclist[custom].rc_contract == 1}Contract<br />{/if}
								{if $reclist[custom].rc_consulting == 1}Consulting<br />{/if}
							</td>
							<td width="210"><h2 class="h_t">Currently Recruiting</h2>	
								<p>{$reclist[custom].jobInfo}</p>
								<div class="butWrap">
								{if $reclist[custom].arefriends == 1}
									<font color="#FF8C00"><b>Connected</b></font>
								{elseif $reclist[custom].isSentRequest == 1}
									<font color="#FF8C00"><b>Invitation Sent</b></font>
								{else}
									{if $u_status == 'Trial'}
									{literal}
									<input type="button" class="button-secondary" value="Invite to Connect" onclick="return $.fancybox({'href':'#inline1','titlePosition':'inside','transitionIn': 'none','transitionOut':'none'});"  />
									{/literal}
									{elseif $reclist[custom].rc_share == 1}
									<a id="butWrap_{$reclist[custom].rc_id}" href="###" onclick="javascript:displays('{$reclist[custom].rc_name}','{$reclist[custom].rc_id}');" title="Connect to this recruiter" class="btn-connect">Invite to Connect</a>
									{else}
									<font color="#FF8C00"><b>Not Open to Invites</b></font>
									{/if}
								{/if}
								</div>
							</td>
						  </tr>
					  {sectionelse}
						   <tr class="hotline {cycle values="odd,even"}">
							<td colspan="6"><font color=red>No data was found for selected field(s).<br>  Try again.  Please note 'Select All' will search for all available data in that field.</font></td>
						   </tr>
					  {/section}
					  </tbody>
					  </table>
					{$page} 
				</div>
			</div>
		</div>
	</div>
{literal}
	<script>	
			function displays(friendname,rid){
				$.fancybox('<form method="POST" id="sentmessage" action="" onsubmit="return ajaxpost('+rid+')"><div><h2 class="title">Invite <span class="yellow">'+ friendname+'</span> to connect with you on enetRecruiter</h2><div class="info">Connecting with someone on enetRecruiter allows you to easily send them messages and collaborate on job requisitions. Once an invitation is accepted, the individual\'s contact details will be added to your contact list. Likewise, your contact information will be added to their contact list.</div><div class="field-item"><textarea name="message" style="width:360px;height:100px" id="prefillmessage">Include a personal message (optional)</textarea></div><div style="btn-wrap"><input type="submit" name="submit" value="Send Invite" class="button-secondary"/> <input type="button" name="close" value="Close" onclick="$.fancybox.close();" class="button-secondary"/><input type="hidden" name="rid" value="'+rid+'" /></div></div></form>',
				{
					'centerOnScroll'   : true ,
					'onComplete' : function(){
						//$("#fancybox-wrap").css({'top':'20px', 'bottom':'auto'});
						$("#prefillmessage").click(function(){
							if( $("#prefillmessage").val() == "Include a personal message (optional)" ){
								 $("#prefillmessage").val("");
							}
						});
					}
				}
				);
			}

			function ajaxpost(rid){
				$.ajax({
					type	: "POST",
					cache	: false,
					url	: "sentsuccess.php",
					dataType: 'json',
					data	: $("#sentmessage").serializeArray(),
					success: function(data) {
						if(data.status = 1)
						{
							$("#butWrap_"+rid).parent().html('<font color="#FF8C00"><b>Invitation Sent</b></font>');
						}
						$.fancybox(data.text);
						
					}
				});
				return false;
			}

	</script>
{/literal}
			